package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.FileModification;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.type.JdbcType;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/FileModificationMapper.class */
public interface FileModificationMapper {
    @Select({"select *  from  file_modification where id = #{id}"})
    @ResultMap({"FileModificationMap"})
    FileModification queryById(Integer num);

    @Select({"select *  from file_modification where  status = #{status}"})
    @Results(id = "FileModificationMap", value = {@Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true), @Result(column = "project_name", property = "projectName", jdbcType = JdbcType.VARCHAR), @Result(column = "project_no", property = "projectNo", jdbcType = JdbcType.VARCHAR), @Result(column = "project_type", property = "projectType", jdbcType = JdbcType.VARCHAR), @Result(column = "deal_with", property = "dealWith", jdbcType = JdbcType.VARCHAR), @Result(column = "section_name", property = "sectionName", jdbcType = JdbcType.VARCHAR)})
    List<FileModification> queryAll(@Param("status") Integer num);

    @Insert({"insert into file_modification (project_name,project_no,project_type,description,deal_with,section_name) values(#{projectName},#{projectNo},#{projectType},#{description},#{dealWith},#{sectionName})"})
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int add(FileModification fileModification);

    @Update({"update file_modification set project_name = #{projectName},project_no=#{projectNo},project_type = #{projectType},description = #{description} ,status = #{status},deal_with = #{dealWith},section_name = #{sectionName} where id = #{id}"})
    int update(FileModification fileModification);

    @Delete({"delete from file_modification where id = #{id}"})
    int deleteById(Integer num);

    @Update({"update file_modification set status = #{status} where id = #{id}"})
    int updateByid(@Param("id") Integer num, @Param("status") Integer num2);

    @Update({"update file_modification set deal_with = #{dealWith} where id = #{id}"})
    int updatedealWithByid(@Param("id") Integer num, @Param("dealWith") Integer num2);
}